using System;
using MonoTouch.SpriteKit;
using MonoTouch.UIKit;
using System.Drawing;

namespace GameOfLifeX.IOS
{
	public class BasicSprite : SKSpriteNode
	{
		public BasicSprite (PointF position, SizeF size)
		{
			Position = position;
			_color = 0;
			SetColor ();
			Size = size;
		}	

		private int _color;	

		public void StepFade()
		{

			_color -= 10;
			if (_color < 0)
				_color = 0;
			SetColor ();
		}

		private void SetColor()
		{

			Color = UIColor.FromRGB (_color, _color, _color);
		}

		public void SetAlive(bool alive)
		{
			if (alive)
			{
				_color = 255;
				SetColor ();
			}
		}
	}
}

